/*
 * @Description: 用于存储数据字典的下拉数据
 * @Author: youzi
 * @Date: 2020-05-25 09:34:19
 * @LastEditors: youzi
 * @LastEditTime: 2020-05-25 10:55:03
 */
import db from 'utils/localstorage';

export default {
  namespaced: true,
  state: {
    // 数字字典，品类
    // 期望返回的数据结构: [{ id: 0, dictName: 'IT软件', child: [{ id: 10, dictName: '小品类的名字' }] }];
    productType: []
  },
  mutations: {
    setProductType(state, val) {
      db.save('PRODUCT_TYPE', val);
      state.productType = val;
    }
  }
};
